/**
 * 实现根据语句求得其中单位的大小
 */
public class UnitHandler {
    public void getUnitValue(String text){
        ITransform transform = new TransForm();
        String[] text3 = text.split("is ");
        String word = text3[1].trim().split(" ")[0];
        int sum = Integer.parseInt(word);
//                    计算出前面罗马数字数组代表的阿拉伯数字
        String[] wordArray = text3[0].trim().split(" ");
//                    单词数组转换为罗马数字数组
        char[] romanArray =transform.wordsToRoman(wordArray);
        int num = transform.toArabic(romanArray);
//                    System.out.println(RomanNumStatic.scoreMap.toString());
        RomanNumStatic.unitMap.put(wordArray[wordArray.length-1],(float)sum/num);
//                    System.out.println(RomanNumStatic.unitMap.toString());
    }
}
